<template>
  <div class="header_ref">
    <div class="tabs_box">
      <ul>
        <li v-for="p in classList" :key="p.id" :class="{ active: classType === p.id }" @click="classChange(p.id)">{{ p.name }}</li>
      </ul>
    </div>
  </div>
</template>
<script lang="ts">
import { ref } from 'vue';

export default {
  setup(props, { emit }) {
    let classType = ref(2);
    // let classList = [ { name: '年级审核', id: 2 }, { name: '校区审核', id: 3 } ];
    // 目前只有年级审核
    let classList = [ { name: '年级审核', id: 2 } ];
    const classChange = (e) => { classType.value = e; emit('type-change', e);};
  
    return { classType, classList, classChange }
  }
}
</script>
<style lang="scss" scoped>
.header_ref {
  display: flex;
  line-height: 60px;
  .tabs_box {
    li {
      float: left;
      padding: 0 20px;
      color: #fff;
      list-style: none;
      position: relative;
      cursor: pointer;
      &.active::after {
        content: '';
        display: block;
        width: 100%;
        height: 6px;
        background: #FAAD14;
        border-radius: 3px;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
      }
    }
  }
  .search {
    margin-left: auto;
    :deep(.el-input__prefix),
    :deep(.el-input__suffix) {
      color: #fff !important;
    }
    :deep(input) {
      width: 240px;
      height: 36px;
      color: #fff;
      border: 0;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.3);
      &::placeholder {color: #fff;}
    }
  }
  .btns {
    margin-left: 30px;
    button {
      color: #72b22a;
      padding: 10px 23px;
      label {
        cursor: pointer;
      }
      input {
        display: none;
      }
    }
  }
}
</style>